from django.urls import re_path, path, include
from rest_framework import routers
from . import views, callme, chat
from mysqldb import views as mv
from VipManager import views as vip_views
from AssetsManager import views as hard_views
from CallManager import views as call_views

router = routers.DefaultRouter()
router.register(r"Sems", mv.AllinpaySemsMsgViewSet, basename="00短信请求")
router.register(r"LoginWeChat", views.WeChatLoginViewSet, basename="01微信登录")
router.register(r"LoginPhone", views.WeChatLoginPhoneViewSet, basename="02微信手机登录")
# router.register(r"StaffBind", views.WeChatStaffBindViewSet, basename="05微信手机绑定")
router.register(r"StaffInfo", views.WeChatStaffListViewSet, basename="06员工个人资料")

router.register(r"PlaceList", views.WeChatAllinpayPlaceListViewSet, basename="10场所所有列表")
router.register(
    r"MyPlaceList", views.WeChatAllinpayPlacestaffListViewSet, basename="11场所绑定列表"
)
router.register(r"MyPlaceReque", views.WeChatBindPlaceViewSet, basename="12场所绑定请求")

router.register(r"MyPlaceMethod", views.WeChatBindPlaceActViewSet, basename="13场所绑定审核")
router.register(r"MyPlaceChange", views.WeChatChangePlaceViewSet, basename="14员工切换场所")
router.register(
    r"MyExtend", views.WeChatWeChatPlaceStaffExtendViewSet, basename="15场所员工扩展信息"
)

router.register(r"MyPerms", views.WeChatBindPermActViewSet, basename="16角色权限列表聚合")
router.register(
    r"MyPermsChange", views.WeChatBindPermChangViewSet, basename="17角色场所权限编辑"
)
router.register(r"MyPermsYun", views.WeChatBindPermYunViewSet, basename="18角色云端权限编辑")
router.register(
    r"MyRoleList", views.WeChatAllinpayPlaceRoleListViewSet, basename="19角色列表"
)
router.register(
    r"StaffRoleList", views.WeChatPlaceStaffRoleListViewSet, basename="20员工分配角色列表"
)
router.register(
    r"RolePlacePerm", views.WeChatNewRoleYunPermsViewSet, basename="21角色场所权限分配聚合"
)
router.register(
    r"RoleYunPerm", views.WeChatNewRoleYunPermsViewSet, basename="22角色云端权限分配聚合"
)

# 会员模块
router.register(r"memberList", vip_views.AllinpayMemberListViewSet, basename="30场所会员列表")
# 硬件模块
router.register(
    r"hardsList", hard_views.AllinpayHardwareListSetViewSet, basename="40场所终端列表"
)
# 呼叫模块
router.register(
    r"callsList", call_views.AllinpayCallmeListViewSet, basename="50场所呼叫记录列表"
)
router.register(r"callWaiter", callme.WeChatCallMeWaiterViewSet, basename="51场所呼叫接单")
router.register(r"callFinish", callme.WeChatCallMeFinishViewSet, basename="52场所呼叫结单")


# router.register(r"test", views.SendUniformMessageViewSet, basename="99统一消息测试")

urlpatterns = [
    path("chat/", chat.MessageCallback.as_view()),
    path("", include(router.urls)),
]
